Preview - Programming: It's For Everyone!

Parameters


Just like the value of a property might affect the outcome of a command, a parameter is a value that can be used as input to a program to change the way it behaves. Below we have our usual turtle sim, but with an important added feature, a slider at the top called NUMBER-OF-LAVA.

Use this new version of the model to answer the questions below.


Questions

Please answer the questions below.

Try changing the NUMBER-OF-LAVA slider to a different value and then clicking the RESET button. Describe what happens.


What happens if you change the NUMBER-OF-LAVA slider to a different number but don't hit the RESET button.


Why does nothing happen if you change the slider but don't hit RESET:

The program doesn't check to see if I changed the slider by itself
The computer doesn't like me
NUMBER-OF-LAVA is a parameter for some part of the program that is run when RESET is clicked
There is a bug in the program

What are some other elements of this simulation that could be parameterized?

Hint: What other things might a player want to customize if they can already change the number of lava patches? These don't need to be numeric.


Notes

These notes will appear on every page in this lesson so feel free to put anything here you'd like to keep track of.